package models

import (
	"gorm.io/gorm"
	"time"
)

type UserBasic struct {
	gorm.Model
	ID            int32     `gorm:"primaryKey;column:id" json:"-"`
	UserName      string    `gorm:"type:varchar(200);" json:"user_name"`
	Password      string    `gorm:"type:varchar(200);" json:"password"`
	Phone         string    `gorm:"type:varchar(20);" json:"phone"`
	Email         string    `gorm:"type:varchar(200);" json:"email"`
	Identity      string    `gorm:"type:varchar(200);" json:"identity"`
	ClientIP      string    `gorm:"type:varchar(200);" json:"client_ip"`
	ClientPort    string    `gorm:"type:varchar(200);" json:"client_port"`
	LoginTime     time.Time `json:"login_time"`
	HeartbeatTime time.Time `json:"heartbeat_time"`
	LogOutTime    time.Time `json:"log_out_time"`
	IsLogout      bool      `json:"is_logout"`
}

func (table *UserBasic) TableName() string {
	return "user_basic"
}
